<style type="text/css">
#content .group_search td {
    width: 15%;
    text-align: center;
}

#content .group_search td:nth-child(1) {
    text-align: left;
    width: auto;
}

#content .group_search td:nth-child(4) {
    text-align: left;
    width: 45%;
}
</style>

<div id="content">
    <h2>Group Search</h2>
    <div class="searchForm">
        <?=form_open('/student/group_search');?>
        <?=form_input('searchTerm');?>
        <?=form_submit('', 'Search');?>
        <?=form_close();?>
    </div>
    <?php if ($groupList): ?>
        <table class="group_search">
            <tr><th>Group Name</th><th>Group Type</th><th>Group Owner</th><th>Description</th></tr>            
                <?php foreach ($groupList as $group): ?><tr>
                    <td><a href="/student/group_details/group/<?=$group['group_id'];?>"><?=ucwords($group['group_name']);?></a></td>
                    <td><?=$group['group_type'];?></td>
                    <td><?=ucwords($group['owner_first'] . ' ' . $group['owner_last']);?></td>
                    <td><?=character_limiter($group['group_description'], 35);?></td>
                </tr><?php endforeach; ?>
        </table>
    <?php endif; ?>
</div> <!-- #content -->